#include<stdio.h>
#include<stdbool.h>
bool string_compare(char *a, char *b);

int main(){
	char a[100] = "abcd";
	char b[100] = "abcd";
	if(string_compare(a,b)){
		printf("字符串相等");
	}else{
		printf("字符串不等");
	}
	return 0;
}


bool string_compare(char *a, char *b){
	while(*a != '\0' && *b != '\0'){
		if(*a == *b){
			a++;
			b++;
		}else{
			return false;
		}
	}
	if(*a == '\0' && *b == '\0'){
		return true;
	}else{
		return false;
	}
}
